package com.qf.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qf.pojo.DtsBrand;
import com.qf.pojo.DtsCategory;
import com.qf.vo.CatVo;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 品牌商表 Mapper 接口
 * </p>
 *
 * @author zhaojian
 * @since 2021-05-12
 */
public interface DtsBrandMapper extends BaseMapper<DtsBrand> {
    @Select("SELECT DISTINCT a.id as value,a.name as label FROM dts_category as a  ,dts_category as b WHERE a.id=b.pid and a.deleted=0")
    public List<CatVo> queryBrand();
    @Select("SELECT  a.id as pid,b.id ,b.name  FROM dts_category as a  ,dts_category as b WHERE a.id=b.pid and a.deleted=0")
    public List<DtsCategory> queryCategory();

}
